package com.ruoyi.stock.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 库存变动日志对象 stock_inventory_log
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
public class StockInventoryLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 日志ID */
    private Long logId;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long productId;
    
    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 变动前数量 */
    @Excel(name = "变动前数量")
    private Long beforeQuantity;

    /** 变动后数量 */
    @Excel(name = "变动后数量")
    private Long afterQuantity;

    /** 变动数量 */
    @Excel(name = "变动数量")
    private Long changeQuantity;

    /** 变动类型（1入库 2出库 3盘点） */
    @Excel(name = "变动类型", readConverterExp = "1=入库,2=出库,3=盘点")
    private String changeType;

    /** 关联单据类型（1采购 2销售 3盘点） */
    @Excel(name = "关联单据类型", readConverterExp = "1=采购,2=销售,3=盘点")
    private String relatedDocType;

    /** 关联单据ID */
    @Excel(name = "关联单据ID")
    private Long relatedDocId;

    /** 仓库编码 */
    @Excel(name = "仓库编码")
    private String warehouseCode;

    /** 操作人 */
    @Excel(name = "操作人")
    private String operator;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date operateTime;

    public void setLogId(Long logId) 
    {
        this.logId = logId;
    }

    public Long getLogId() 
    {
        return logId;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    
    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }

    public void setBeforeQuantity(Long beforeQuantity) 
    {
        this.beforeQuantity = beforeQuantity;
    }

    public Long getBeforeQuantity() 
    {
        return beforeQuantity;
    }

    public void setAfterQuantity(Long afterQuantity) 
    {
        this.afterQuantity = afterQuantity;
    }

    public Long getAfterQuantity() 
    {
        return afterQuantity;
    }

    public void setChangeQuantity(Long changeQuantity) 
    {
        this.changeQuantity = changeQuantity;
    }

    public Long getChangeQuantity() 
    {
        return changeQuantity;
    }

    public void setChangeType(String changeType) 
    {
        this.changeType = changeType;
    }

    public String getChangeType() 
    {
        return changeType;
    }

    public void setRelatedDocType(String relatedDocType) 
    {
        this.relatedDocType = relatedDocType;
    }

    public String getRelatedDocType() 
    {
        return relatedDocType;
    }

    public void setRelatedDocId(Long relatedDocId) 
    {
        this.relatedDocId = relatedDocId;
    }

    public Long getRelatedDocId() 
    {
        return relatedDocId;
    }

    public void setWarehouseCode(String warehouseCode) 
    {
        this.warehouseCode = warehouseCode;
    }

    public String getWarehouseCode() 
    {
        return warehouseCode;
    }

    public void setOperator(String operator) 
    {
        this.operator = operator;
    }

    public String getOperator() 
    {
        return operator;
    }

    public void setOperateTime(Date operateTime) 
    {
        this.operateTime = operateTime;
    }

    public Date getOperateTime() 
    {
        return operateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("logId", getLogId())
            .append("productId", getProductId())
            .append("productName", getProductName())
            .append("beforeQuantity", getBeforeQuantity())
            .append("afterQuantity", getAfterQuantity())
            .append("changeQuantity", getChangeQuantity())
            .append("changeType", getChangeType())
            .append("relatedDocType", getRelatedDocType())
            .append("relatedDocId", getRelatedDocId())
            .append("warehouseCode", getWarehouseCode())
            .append("operator", getOperator())
            .append("operateTime", getOperateTime())
            .append("remark", getRemark())
            .toString();
    }
} 